<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>楼盘案名大猜想</title>
		<link rel="stylesheet" href="/game-buildguess/css/index.css" />
		<script src="/game-buildguess/jquery-2.1.0.js"></script>
		<script src="//static1.finchain.cc/jquery.form.js"></script>
	</head>
	<body>
		<div id="index" style="padding-bottom: 30px;box-sizing: border-box; overflow: auto;">
			<img class="logo" src="/game-buildguess/img/logo.png" alt="" />
			<img class="indexBanner" src="/game-buildguess/img/bj-2_01.png" alt="" />
			<img class="close" src="/game-buildguess/img/close.png" alt="" />
			<form id="startForm">
				<span class="countDown"></span>
				<div class="one subject">
					<div class="content">
						<p><span>美</span><span>景</span><input type="text" name="" maxlength="1" /><span>城</span></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>梧</span><span>桐</span><input type="text" name="" maxlength="1" /><span>语</span></p>
					</div>
					<div class="content">
						<p><span>长</span><span>江</span><input type="text" name="" maxlength="1" /><span>号</span></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><span>龙</span><span>新</span><span>城</span></p>
					</div>
					<div class="content">
						<p><span>恒</span><span>大</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>台</span></p>
					</div>
				</div>
				<div class="two subject">
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>一</span><span>号</span></p>
					</div>
					<div class="content">
						<p><span>建</span><span>业</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>庄</span><span>园</span></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>地</span></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>里</span><span>传</span><span>说</span></p>
					</div>
					<div class="content">
						<p><span>正</span><input type="text" name="" maxlength="1" /><span>湾</span></p>
					</div>
				</div>
				<div class="three subject">
					<div class="content">
						<p><span>光</span><input type="text" name="" maxlength="1" /><span>索</span><input type="text" name="" maxlength="1" /><span>湾</span></p>
					</div>
					<div class="content">
						<p><span>经</span><span>开</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>城</span></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>中</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /></p>
					</div>
					<div class="content">
						<p><span>长</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>月</span><span>湾</span></p>
					</div>
					<div class="content">
						<p><span>大</span><span>正</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /></p>
					</div>
				</div>
				<div class="four subject">
					<div class="content">
						<p><span>和</span><input type="text" name="" maxlength="1" /><span>湾</span><span>景</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>春</span><span>天</span><span>里</span></p>
					</div>
					<div class="content">
						<p><span>居</span><span>易</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>原</span><span>著</span></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>国</span><span>际</span><span>旅</span><span>游</span><span>度</span><span>假</span><span>区</span></p>
					</div>
					<div class="content">
						<p><span>金</span><input type="text" name="" maxlength="1" /><span>府</span></p>
					</div>
				</div>
				<div class="five subject">
					<div class="content">
                        <p><span>青</span><input type="text" name="" maxlength="1" /><span>公</span><span>园</span></p>
					</div>
					<div class="content">
						<p><span>汇</span><span>泉</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>城</span></p>
					</div>
                    <div class="content">
                        <p><span>富</span><input type="text" name="" maxlength="1" /><span>尚</span><input type="text" name="" maxlength="1" /><span>居</span></p>
                    </div>
					<div class="content">
						<p><span>龙</span><input type="text" name="" maxlength="1" /><span>湖</span><span>畔</span></p>
					</div>
					<div class="content">
						<p><span>河</span><span>南</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>银</span><span>河</span><span>居</span></p>
					</div>
				</div>
				<div class="six subject">
					<div class="content">
						<p><span>正</span><span>弘</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>叙</span></p>
					</div>
					<div class="content">
						<p><span>领</span><span>创</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>华</span><span>庭</span></p>
					</div>
					<div class="content">
						<p><span>水</span><input type="text" name="" maxlength="1" /><span>华</span><span>城</span></p>
					</div>
					<div class="content">
						<p><span>公</span><input type="text" name="" maxlength="1" /><span>道</span><span>一</span><span>号</span></p>
					</div>
					<div class="content">
						<p><span>华</span><span>瑞</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>城</span></p>
					</div>
				</div>
				<div class="seven subject">
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><span>艺</span><span>银</span><span>河</span><span>里</span></p>
					</div>
					<div class="content">
						<p><span>美</span><span>景</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>立</span><span>方</span><span>体</span></p>
					</div>
					<div class="content">
						<p><span>法</span><span>兰</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /></p>
					</div>
					<div class="content">
						<p><span>世</span><input type="text" name="" maxlength="1" /><span>四</span><input type="text" name="" maxlength="1" /><span>院</span></p>
					</div>
					<div class="content">
						<p><span>丰</span><span>乐</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>公</span><span>馆</span></p>
					</div>
				</div>
				<div class="eight subject">
					<div class="content">
						<p><span>中</span><span>建</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>上</span><span>郡</span></p>
					</div>
					<div class="content">
						<p><span>和</span><input type="text" name="" maxlength="1" /><span>盛</span><input type="text" name="" maxlength="1" /><span>城</span><span>邦</span></p>
					</div>
					<div class="content">
						<p><span>永</span><span>威</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>院</span></p>
					</div>
					<div class="content">
						<p><span>新</span><input type="text" name="" maxlength="1" /><span>城</span></p>
					</div>
					<div class="content">
						<p><span>碧</span><input type="text" name="" maxlength="1" /><span>园</span></p>
					</div>
				</div>
				<div class="nine subject">
					<div class="content">
						<p><span>普</span><span>罗</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /></p>
					</div>
					<div class="content">
						<p><span>美</span><span>景</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /></p>
					</div>
					<div class="content">
						<p><span>华</span><span>强</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>广</span><span>场</span></p>
					</div>
					<div class="content">
						<p><span>保</span><span>利</span><input type="text" name="" maxlength="1" /><span>语</span></p>
					</div>
					<div class="content">
						<p><span>中</span><span>浩</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>郡</span></p>
					</div>
				</div>
				<div class="ten subject">
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>天</span><span>伦</span><span>紫</span><span>台</span></p>
					</div>
					<div class="content">
						<p><span>中</span><input type="text" name="" maxlength="1" /><span>锦</span><span>城</span></p>
					</div>
					<div class="content">
						<p><span>中</span><span>昂</span><input type="text" name="" maxlength="1" /><span>悦</span></p>
					</div>
					<div class="content">
						<p><span>创</span><input type="text" name="" maxlength="1" /><span>广</span><span>场</span></p>
					</div>
					<div class="content">
						<p><span>康</span><span>桥</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>镇</span></p>
					</div>
				</div>
				<div class="eleven subject">
					<div class="content">
						<p><span>东</span><input type="text" name="" maxlength="1" /><span>玺</span><span>城</span></p>
					</div>
					<div class="content">
						<p><span>正</span><span>商</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>溪</span><span>岸</span></p>
					</div>
					<div class="content">
						<p><span>恒</span><span>祥</span><input type="text" name="" maxlength="1" /><span>悦</span><span>城</span></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>森</span><span>林</span><span>花</span><span>语</span></p>
					</div>
					<div class="content">
						<p><span>润</span><input type="text" name="" maxlength="1" /><span>时</span><span>光</span><span>里</span></p>
					</div>
				</div>
				<div class="twelve subject">
					<div class="content">
						<p><span>宋</span><input type="text" name="" maxlength="1" /><span>绿</span><span>城</span><span>玉</span><span>园</span></p>
					</div>
					<div class="content">
						<p><span>建</span><span>业</span><span>天</span><input type="text" name="" maxlength="1" /></p>
					</div>
					<div class="content">
						<p><span>未</span><span>来</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /></p>
					</div>
					<div class="content">
						<p><span>中</span><span>力</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>公</span><span>馆</span></p>
					</div>
					<div class="content">
						<p><span>瀚</span><input type="text" name="" maxlength="1" /><span>晴</span><span>宇</span></p>
					</div>
				</div>
				<div class="thirteen subject">
					<div class="content">
						<p><span>泰</span><span>宏</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>和</span><span>苑</span></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>善</span><span>水</span><span>上</span><span>境</span></p>
					</div>
					<div class="content">
						<p><span>金</span><span>领</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /></p>
					</div>
					<div class="content">
						<p><span>星</span><input type="text" name="" maxlength="1" /><span>湾</span></p>
					</div>
					<div class="content">
						<p><span>富</span><input type="text" name="" maxlength="1" /><span>九</span><span>鼎</span><span>世</span><span>家</span></p>
					</div>
				</div>
				<div class="fourteen subject">
					<div class="content">
						<p><span>宏</span><input type="text" name="" maxlength="1" /><span>合</span><span>园</span></p>
					</div>
					<div class="content">
						<p><span>信</span><span>保</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>风</span><span>十</span><span>里</span></p>
					</div>
					<div class="content">
						<p><span>美</span><span>景</span><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>麟</span><span>洲</span></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>檀</span><span>悦</span></p>
					</div>
					<div class="content">
						<p><input type="text" name="" maxlength="1" /><input type="text" name="" maxlength="1" /><span>和</span><span>园</span></p>
					</div>
				</div>
				<input type="submit" value="" />
				<input value="#(timeStart??)" type="hidden" class="timeStart">
			</form>
		</div>
		<div id="indexMask" style="padding-bottom: 10px;">
			<img class="logo" src="/game-buildguess/img/logo.png" alt="" />
			<img class="indexBanner" src="/game-buildguess/img/noWinBg.png" alt="" />
			<img class="close ruleClose" src="/game-buildguess/img/close.png" alt="" />
			<div class="indexRules noWin">
				<!--未闯关成功-->
				<img class="nowin isWin" src="/game-buildguess/img/noWin1.png" alt="" />
				<!--未中奖-->
				<img class="nowin isWin" src="/game-buildguess/img/noWin2.png" alt="" />
				<!--未中奖-->
				<img class="nowin isWin" src="/game-buildguess/img/noWin3.png" alt="" />
				<!--中奖-->
				<div class="win isWin">
					<p>可以哦，我的小宝贝</p>
					<p>恭喜你获得价值<span class="valuep"></span>元的<span  class="namep" class="prize-name"></span>奖品一份+1次掷筛子机会</p>
					<img src="/game-buildguess/img/win.png" alt="" />
					<h3>中奖编码：<span class="nop"></span></h3>
					<p>兑奖方式可在“我的奖品”中查看 请幸运的你，在规定时间到指定地点，领取你的专属奖品！  </p>
				</div>
			</div>
			<img class="continue" src="/game-buildguess/img/continue.png" alt="" />
		</div>

	</body>
	<script type="text/javascript">

		var rand=Math.floor(Math.random()*14);
		$(".subject").hide().eq(rand).show();
		$(".subject input").attr("name","");
		var inputs = $(".subject").eq(rand).children().find("input");
		for(var i = 0,len = inputs.length; i < len;i++){
		    inputs.eq(i).attr("name","answer");
		}
		$(".close").click(function(){
			$("#indexMask").hide();
            window.location.href="/buguess/back"
		});
        $(".continue").click(function(){
            location.reload();
        });

        var time=$(".timeStart").val();
        var timer=setInterval(function(){
            time--;
            $(".countDown").text(time+"s");
            if(time==0){
                clearInterval(timer);
                $("input[type=submit]").attr("disabled","disabled");
            };
        },1000);

        $("#startForm").submit(function(){
            $(this).ajaxSubmit({
                url:"/buguess/submitGuess?rand="+rand,
                type:"post",
                success:function(data){
                    var trueCount = data.randCount;
                    if(trueCount < 5){
                        $("#indexMask").show();
                        $(".isWin").hide().eq(0).show();
					}else{
                        if(trueCount >= 7 && data.isPrize){
                            $(".valuep").html(data.valuep);
                            $(".namep").html(data.namep);
                            $(".nop").html(data.nop);
                            $("#indexMask").show();
                            $(".isWin").hide().eq(3).show();
						}else {
							var random = Math.random()*10;
							if(random < 6){
                                $("#indexMask").show();
                                $(".isWin").hide().eq(1).show();
							}else{
                                $("#indexMask").show();
                                $(".isWin").hide().eq(2).show();
							}
						}
					}
                },
            });
            return false;
        })

		

	</script>
</html>
